The present invention relates to the field of computer program installation, and more particularly to a system and method for deploying a hardware configuration with a computer program, e.g., in order to enable a computer program that interacts with hardware devices to execute correctly when installed on a new computer system. In one embodiment, the computer program may perform an instrumentation function, such as a test and measurement or industrial automation function, and deploying the hardware configuration may enable the program to correctly interact with an instrument connected to the new computer system.
Computer systems are used to interact with hardware devices or instruments in many fields, including the fields of instrumentation, process control, industrial automation, simulation, machine vision, motion control, and multimedia, among others. For example, a computer system may interact with instruments to measure and/or control various types of systems. These systems may include any of various types of physical, mechanical, electrical, chemical, or thermodynamic elements or phenomena, among others, or some combination of such elements or phenomena. Exemplary systems include: an engine or an engine component, a device in motion, a chemical reaction, a petroleum refining process, a room maintained at a setpoint temperature, a system of liquids flowing among different tanks, etc.
In an application such as a measurement/control application, a computer system may interact with one or more sensors/transducers operable to sense one or more variables of a system and output a signal based on the variables. The signals produced by the sensors/transducers are most typically an electrical signal, e.g., a voltage or current, but may also be any of various other types of signals. In various applications, the computer system may also interact with one or more control devices/actuators, e.g., to provide control signals affecting a system. In some cases, a single instrument or device may serve as both a sensor and a control device.
Users commonly develop computer programs to interact with the devices or instruments connected to or included in a computer system, e.g., using various application development environments. For example, many different software applications specialized for developing instrumentation, test and measurement, and industrial automation programs are available. These programs may, for example, interface with device driver software in order to interact with a device.
In order to enable a computer program and/or the device drivers called by a computer program to correctly interact with a hardware device, it is often necessary to perform various types of hardware configuration. For example, consider a computer program that interacts with a data acquisition (DAQ) plug-in board to acquire and analyze data. In order for the program to execute correctly, it may be necessary to configure hardware interrupts for the DAQ board, configure gain settings, etc. Also, the program may refer to a particular DAQ channel by a name associated with the channel. Thus it may also be necessary to configure these name associations.
The user often uses separate configuration utilities to configure the hardware devices connected to a computer system as desired. A computer program may then be written based on the user""s knowledge of the hardware configuration state of the computer system that will execute the program. For example, a program that analyzes a signal acquired from a device may require a gain associated with the device to be set to a particular value in order for the program to function correctly. Thus, the execution behavior of a program that interacts with a hardware device may depend not only on the program code, but may also depend on various aspects of the hardware configuration of the computer system on which the program executes.
After a computer program has been developed, it is often necessary to deploy the program on a new computer system. For example, the program may have been developed for commercial distribution, or the user may need to execute the program on multiple computers, e.g., in order to interact with multiple physical systems. In the prior art, the dependency of a program on the hardware configuration of a computer system is often problematic when the user attempts to deploy the program on a new computer system. For example, the hardware devices connected to the new computer system may be configured differently, or various named channels or I/O operations used by the program may not exist on the new computer system or may be used in conflicting ways.
Thus, in order for the program to execute correctly on the new computer system, the user may be required to manually specify the necessary configuration information, e.g., by running separate configuration utilities. This can be a difficult and time-consuming task. Requiring users to perform this type of manual configuration is especially undesirable when a program is distributed commercially.
In some cases, it may be possible to include code in the computer program that is operable to perform various hardware configuration operations. However, requiring the program developer to include these types of operations in a program is undesirable, since coding these configuration operations can be error-prone and time-consuming. It would be better if the developer only needed to concentrate on the function of the program.
Thus, it would be desirable to provide a system and method for deploying a hardware configuration with a computer program, to enable a program that interacts with hardware devices to execute correctly when installed on a new computer system.
One embodiment of the present invention comprises a system and method for deploying a hardware configuration with a computer program. A program developer may develop a program that interacts with one or more hardware devices or instruments on a computer system. For example, the program may interact with the hardware device(s) in order to perform an instrumentation, measurement/control, industrial automation, or machine vision function, or any of various other types of functions utilizing hardware devices.
As described above, the behavior of the program during execution may depend on various aspects of the hardware configuration of the computer system on which the program executes. One embodiment of the present invention enables the developer to automatically create an installation bundle that includes configuration information related to the hardware devices with which the program interacts. The installation bundle may then be used to deploy the program on a new computer system. For example, the installation bundle may include program instructions operable to install the program on the new computer system and automatically configure hardware devices connected to the new computer system so that the program will execute correctly.
In various embodiments, any of various types of configuration information may be included in the installation bundle. For example, various hardware device types and standards are commonly used, such as DAQ, GPIB, VXI, PXI, etc. If a program interacts with a DAQ device, for example, the configuration information may include information specifying various settings for the DAQ hardware, such as interrupts, gain values, etc. In this case, the configuration information may also include information specifying various named elements that the program uses, such as named channels, named I/O operations, etc.
The configuration information may be determined in any of various ways. For example, the method may operate to determine functions, methods, subprograms, graphical program nodes, etc., that are called by or included in the program and are related to a hardware device. These functions, methods, etc., may be determined in various ways, e.g., depending on the type of program, the application development environment or language used to create the program, etc. For example, an application development environment used to create the program may provide libraries related to various types of hardware devices, such as DAQ devices, GPIB devices, VXI devices, P)U devices, etc. Thus, the method may determine whether the program uses any of these libraries, and if so, may determine hardware configuration information related to the library. For example, if a DAQ library is used, DAQ hardware configuration information may be included in the installation bundle. In one embodiment, separate modules may be used to determine hardware configuration information related to different types of hardware devices.
In one embodiment, the program may be a graphical program, i.e., a program that includes a plurality of interconnected nodes that visually indicate the function of the program. In this case, the method may examine nodes included in the graphical program, such as function nodes or subprogram nodes, and may determine whether any nodes related to hardware devices are included in the program.
The configuration information may be stored in the installation bundle in any way desired. This information may include text and/or binary information. In one embodiment, the configuration information is represented using XML.
When the user executes the program instructions included in the installation bundle, the program instructions may examine the configuration information to determine the hardware requirements of the program and may change the configuration of one or more hardware devices on the new computer system if necessary. For each type of device that the program interacts with, the installation bundle may interface with a separate deployment module corresponding to the device type, wherein the deployment module is operable to configure devices of that type on the new computer system.
As an example, consider a case where the original computer system includes a DAQ plug-in board and that the program uses a named DAQ channel to interact with the DAQ board. In this case, information regarding the named DAQ channel may be included in the installation bundle. When the program is installed on the new computer system, a DAQ deployment module may be operable to create a DAQ channel of the same name on the new computer system, so that the program will not fail when it attempts to use this channel.
The deployment module may also resolve hardware conflicts and may include knowledge of how to configure the hardware information on the new computer system such that the configuration is not exactly like the configuration of the original computer system, but is appropriate for the new computer system and enables the program to execute correctly. For example, if a DAQ device was installed in PCI slot 0 of the original computer, and a DAQ device is installed in PCI slot 1 on the new computer, the deployment module may determine that the DAQ device installed in PCI slot 1 can be used.